package Vista;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;

import FactoryMethod.Creador;
import FactoryMethod.CreadorAcceso;
import FactoryMethod.CreadorMenu;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Acceso extends javax.swing.JFrame {
	/**
	 * @uml.property  name="jButton1"
	 * @uml.associationEnd  multiplicity="(1 1)"
	 */
	private JButton jButton1;
	/**
	 * @uml.property  name="jLabel2"
	 * @uml.associationEnd  multiplicity="(1 1)"
	 */
	private JLabel jLabel2;
	/**
	 * @uml.property  name="jLabel1"
	 * @uml.associationEnd  multiplicity="(1 1)"
	 */
	private JLabel jLabel1;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				Acceso inst = new Acceso();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public Acceso() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			{
				jButton1 = new JButton();
				getContentPane().add(jButton1, "Center");
				jButton1.setText("Entrar");
				jButton1.setBounds(285, 157, 96, 24);
				jButton1.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent evt) {
						System.out.println("jButton1.actionPerformed, event="+evt);
					    Creador aCreador;
    				    aCreador= new CreadorMenu();
    				    Menu  menu =  (Menu) aCreador.unaOperacion();
					    menu.show();

						//TODO add your code for jButton1.actionPerformed
					}
				});
			}
			{
				jLabel1 = new JLabel();
				getContentPane().add(jLabel1);
				jLabel1.setText("Bienvenidos al Sistema");
				jLabel1.setBounds(60, 60, 285, 30);
				jLabel1.setFont(new java.awt.Font("Segoe UI",1,26));
			}
			{
				jLabel2 = new JLabel();
				getContentPane().add(jLabel2);
				jLabel2.setText("Presione el boton \"Entrar\" para acceder");
				jLabel2.setBounds(129, 96, 144, 15);
				jLabel2.setFont(new java.awt.Font("Segoe UI",0,8));
			}
			pack();
			this.setSize(418, 240);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

}
